<?php

namespace app\demo\controller;

use app\BaseController;

class M extends BaseController
{
    public function index()
    {
        $categoryId = input("param.category_id", 0, 'intval');
        if (empty($categoryId)) {
            return show(config("status.error"), "参数错误");
        }

        $cateBusiness = new \app\common\business\Demo();
        $results = $cateBusiness->getDemoDataByCategoryId($categoryId);

        return show(config("status.success"), "OK", $results);
    }
}